import * as bm from "/js/baseModule.js";

export class Module extends bm.baseModule {
    constructor(view) {
        super(view);
    }
    afterUninstall(){
        if(typeof WeixinJSBridge != "undefined"){
            //当前弹窗关闭后，关闭浏览器
            WeixinJSBridge.invoke('closeWindow', {}, function (res) {});
        }else{
            funs.tip('操作失败','当前页面不是在微信浏览器打开','fail');
        }
    }
    showModal() {
        let content = this.config.parent.find('.CenterModalContent');
        let height = content.height();
        content.css('margin-top', -height / 2 + 'px').find('.icon-cross').remove();
        setTimeout(function () {
            content.css({'transform': 'scale(1,1)', 'opacity': '1'});
        }, 100);
    }
    _evt_close(){
        if(typeof WeixinJSBridge != "undefined"){
            //当前弹窗关闭后，关闭浏览器
            WeixinJSBridge.invoke('closeWindow', {}, function (res) {});
        }else{
            funs.tip('操作失败','当前页面不是在微信浏览器打开','fail');
        }
    }
}
